<template>
    <div>
        <x-img src="http://cdn.maxstudiozhuhai.com/mxws.png?v=1.1"></x-img>
        <grid>
            <grid-item label="活动详情" link="/activity/2">
                <img slot="icon" src="../assets/btn/activity.png">
            </grid-item>
            <grid-item label="设施投票" link="/activity/3/catalogs">
                <img slot="icon" src="../assets/btn/photos.png">
            </grid-item>
        </grid>

    </div>
</template>

<script>
    /* eslint-disable */
    import PTHeader from '../components/PTHeader.vue'
    import { XImg, Grid, GridItem } from 'vux'

    export default {
        data () {
            return {}
        },
        components: {
            'pt-header': PTHeader,
            XImg,
            Grid,
            GridItem
        },
        mounted () {

            var _this = this
            this.$wechat.ready(function () {
                _this.$wechat.onMenuShareAppMessage({
                    title: '2018漫享万山最美海岛设施评选', // 分享标题
                    desc: '快来为你心中的最美海岛设施投票吧！', // 分享描述
                    imgUrl: 'http://cdn.maxstudiozhuhai.com/mxws.png',
                    link: window.location.href, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                    type: '', // 分享类型,music、video或link，不填默认为link
                    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
                    success: function () {

                    },
                    cancel: function () {

                    }
                })

                _this.$wechat.onMenuShareTimeline({
                    title: '2018漫享万山最美海岛设施评选', // 分享标题
                    imgUrl: 'http://cdn.maxstudiozhuhai.com/mxws.png',
                    link: window.location.href, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                    success: function () {
                        // 用户确认分享后执行的回调函数
                    },
                    cancel: function () {
                        // 用户取消分享后执行的回调函数
                    }
                })
            })


        }
    }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
